import 'dart:core';

void main() {
    var now = new DateTime.now();
    print(now.year);
    print(now.month);/*1...12*/
    print(now.day);/*1...31*/
    print(now.hour);/*0...23*/
    print(now.minute);/*0...59*/
    print(now.second);/*0...59*/
    print(now.millisecond);/*毫秒0...999*/
    print(now.microsecond);/*微秒0...999*/
    print(now.weekday);/*1-7对应星期一到星期天*/
    print(DateTime.january);/*january,february,march,april,may,june,july,august,september,october,november,december*/
    print(DateTime.monday);/*monday,tuesday,wednesday,thursday,friday,saturday,sunday*/
    print(DateTime.monthsPerYear);/*一年12个月*/
    print(DateTime.daysPerWeek);/*一星期7天*/
    print(DateTime.parse("2020-03-01 11:12:13"));
}